from socket import *
import time

ip_port=("localhost",51590)
buffer_size=1024
udp_clent=socket(AF_INET,SOCK_DGRAM)
while True:
    msg=input("请输入>>>：").strip()
    print(msg.encode("utf-8"))
    udp_clent.sendto(msg.encode("utf-8"),ip_port)
    data,addr = udp_clent.recvfrom(buffer_size)
    print("ntp 服务器的标准时间是:", data.decode("utf-8"))
udp_clent.close()